.class final Lcom/burstly/lib/service/ServerConfigurationService$4;
.super Ljava/lang/Object;
.source "ServerConfigurationService.java"

# interfaces
.implements Ljava/lang/Runnable;


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcom/burstly/lib/service/ServerConfigurationService;->shutdown()V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x8
    name = null
.end annotation


# instance fields
.field final synthetic val$configurationService:Ljava/util/concurrent/ExecutorService;


# direct methods
.method constructor <init>(Ljava/util/concurrent/ExecutorService;)V
    .locals 0
    .parameter

    .prologue
    .line 464
    iput-object p1, p0, Lcom/burstly/lib/service/ServerConfigurationService$4;->val$configurationService:Ljava/util/concurrent/ExecutorService;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public run()V
    .locals 7

    .prologue
    .line 468
    invoke-static {}, Lcom/burstly/lib/util/Utils;->lowerCurrentThreadPriority()V

    .line 469
    sget-object v3, Lcom/burstly/lib/service/ServerConfigurationService;->LOG:Lcom/burstly/lib/util/LoggerExt;

    sget-object v4, Lcom/burstly/lib/service/ServerConfigurationService;->TAG:Ljava/lang/String;

    const-string v5, "Shutting down configurator service..."

    const/4 v6, 0x0

    new-array v6, v6, [Ljava/lang/Object;

    invoke-virtual {v3, v4, v5, v6}, Lcom/burstly/lib/util/LoggerExt;->logDebug(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    .line 470
    iget-object v3, p0, Lcom/burstly/lib/service/ServerConfigurationService$4;->val$configurationService:Ljava/util/concurrent/ExecutorService;

    invoke-interface {v3}, Ljava/util/concurrent/ExecutorService;->shutdownNow()Ljava/util/List;

    .line 471
    const/4 v3, 0x1

    sput-boolean v3, Lcom/burstly/lib/service/ServerConfigurationService;->sLoadConfig:Z

    .line 472
    const/4 v1, 0x0

    .line 473
    .local v1, recep:Lcom/burstly/lib/service/ServerConfigurationService$IServerConfigurable;
    invoke-static {}, Lcom/burstly/lib/service/ServerConfigurationService;->getRecipientsSnapshot()Ljava/util/Set;

    move-result-object v3

    invoke-interface {v3}, Ljava/util/Set;->iterator()Ljava/util/Iterator;

    move-result-object v0

    .local v0, i$:Ljava/util/Iterator;
    :cond_0
    :goto_0
    invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z

    move-result v3

    if-eqz v3, :cond_2

    invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Lcom/burstly/lib/service/ServerConfigurationService$ConfigurationTaskWrapper;

    .line 474
    .local v2, wrp:Lcom/burstly/lib/service/ServerConfigurationService$ConfigurationTaskWrapper;
    invoke-virtual {v2}, Lcom/burstly/lib/service/ServerConfigurationService$ConfigurationTaskWrapper;->getRecepient()Lcom/burstly/lib/service/ServerConfigurationService$IServerConfigurable;

    move-result-object v1

    if-nez v1, :cond_1

    .line 475
    sget-object v3, Lcom/burstly/lib/service/ServerConfigurationService;->RECIPIENTS:Ljava/util/Set;

    invoke-interface {v3, v2}, Ljava/util/Set;->remove(Ljava/lang/Object;)Z

    goto :goto_0

    .line 478
    :cond_1
    invoke-interface {v1}, Lcom/burstly/lib/service/ServerConfigurationService$IServerConfigurable;->isConstantRecepient()Z

    move-result v3

    if-nez v3, :cond_0

    .line 479
    sget-object v3, Lcom/burstly/lib/service/ServerConfigurationService;->RECIPIENTS:Ljava/util/Set;

    invoke-interface {v3, v2}, Ljava/util/Set;->remove(Ljava/lang/Object;)Z

    goto :goto_0

    .line 482
    .end local v2           #wrp:Lcom/burstly/lib/service/ServerConfigurationService$ConfigurationTaskWrapper;
    :cond_2
    sget-object v3, Lcom/burstly/lib/service/ServerConfigurationService;->RECIPIENTS:Ljava/util/Set;

    invoke-interface {v3}, Ljava/util/Set;->clear()V

    .line 483
    return-void
.end method
